<template>
  <div @click="handleClick">
    点击这个区域，查看控制台输出的鼠标位置
  </div>
</template>

<script setup lang="ts">
function handleClick(event: MouseEvent){
  const {clientX,clientY} = event;
  console.log(`鼠标点击的位置是：${clientX},${clientY}`);
}
</script>

<style scoped>
div {
padding: 50px;
border: 1px solid #ccc;
text-align: center;
cursor: pointer;
}</style>